<!-- 招聘机构列表 -->
<template>
	<view class="container">
		<view class="w-cell" @click="toOrgRecruitDetail">
			<u-cell-group>
				<u-cell v-for="(item,index) in orgList" :key="item.id" :title="item.organ_name" :label="item.contact_address" :value="item.title" size="large" :data-index="index"></u-cell>
			</u-cell-group>
		</view>
		<view class="c-empty" v-if="orgList.length==0">
			<u-empty icon="/static/empty/list.png" text="无更多机构" textSize="18" marginTop="25%" width="80%"></u-empty>
		</view>
		<u-overlay :show="isOverlay" @click="isOverlay = false">
			<view class="w-overlay">
				<view class="overlay">
					<view class="overlay-content" @tap.stop>
						<text style="font-size: 36rpx;font-weight: bold;line-height: 60rpx;">{{orgInfo.organ_name}}</text>
						<view style="padding: 10rpx;background-color: #eee;width: 100%;box-sizing: border-box;">
							
								<text style="color: #666;line-height: 40rpx;">{{orgInfo.organ_desc}}</text>
						</view>
						<text>招聘岗位：{{orgInfo.title}}</text>
						<text>负责人：{{orgInfo.contact_name}}</text>
						<text>联系方式：{{orgInfo.contact_tel}}</text>
						<text>机构地址：{{orgInfo.contact_address}}</text>
					</view>
				</view>
			</view>
		</u-overlay>
	</view>
</template>

<script>
	export default {
		name:"",
		data() {
			return {
				// 简历列表
				orgList:[],
				orgInfo:{}, // 机构详细信息
				isOverlay:false // 遮罩层
			}
		},
		onLoad() {
			this.getRecruitmentOrgList()
		},
		methods: {
			// 跳转简历详情
			toOrgRecruitDetail(e){
				// this.navigateTo(`mineRecruitmentOrgInfo?id=${e.target.dataset.id}`)
				this.orgInfo = this.orgList[e.target.dataset.index]
				this.isOverlay = true
			},
			// 获取机构列表
			getRecruitmentOrgList(){
				this.$http.getRecruitmentOrgList().then(res=>{
					this.orgList = res.data
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{
		.w-cell{
			background-color: #fff;
		}
		.w-overlay{
			width: 100%;
			min-height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			.overlay{
				width: 80%;
				// min-height:40% ;
				background-color: #fff;
				border-radius: 15rpx;
				padding: 20rpx;
				box-sizing: border-box;
				.overlay-content{
						
					&>text{
						display: block;
						line-height: 60rpx;
					}
				}
			}
		}
	}
</style>
